package wqh.global;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by tsinghua on 2017/1/26.
 */
public class GlobalID {

    public static final Set<String> sets = Collections.synchronizedSet(new HashSet<>());

    public synchronized static void addID(String id){
        sets.add(id);
    }

    public synchronized static void removeID(String id){
        sets.remove(id);
    }

    public synchronized static Set<String> getIDs(){

        return sets;

    }


}
